package com.cloud.seatatmone.controller;

import com.cloud.seatatmone.service.Seata_TCC_Service;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Main_Model_TCC_Controller {

    @Autowired
    private Seata_TCC_Service service;

    @PostMapping("/test_TCC")
    @GlobalTransactional(rollbackFor = Exception.class)
    public String testTCC(){
        service.test_TCC(null);
        return "测试成功";
    }
}
